var express = require('express');
var router = express.Router();
var mysql = require('mysql');
var conn = mysql.createConnection({
    host: 'localhost',
    user: 'root',
    password: '233',
    database:'blog',
    port: 3306
});
conn.connect();
/* GET users listing. */
router.get('/login', function(req, res, next) {
	conn.query('select * from articles', function(err, rows, fields) {
			if (err) throw err;
			res.cookie("aaa","bbb")
	  		res.render('login', { title: '登录平台' ,item:rows});	
		})
 
});

module.exports = router;
